package cn.com.jonpad.service;


import cn.com.jonpad.entities.Dept;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 使用 fallbackFactory 指定调用出错的异常处理方法
 */
@FeignClient(value = "MICROSERVICECLOUD-DEPT",fallbackFactory = DeptClientServiceFallbackFactory.class)
public interface DeptClientService {
	@GetMapping(value = "/dept/get/{id}")
	Dept get(@PathVariable("id") long id);

	@GetMapping (value = "/dept/list")
	List<Dept> list();

	@PostMapping(value = "/dept/add" )
	boolean add(Dept dept);
}
